<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>underscore中的_.bindAll函数示例</title>
			<script src="../js/jquery-1.8.3.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/Underscore-1.8.3min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/backbone.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="divTip"> 点击我 </div>
		<script type="text/javascript">
			var  divView={
				ele:'#divTip',
				tip:'hello,underscore!',
				onClick:function(){
					$(this.ele).html(this.tip);
				}
			}; 
  			_.bindAll(divView,'onClick');
			$(divView.ele).bind('click',divView.onClick);
			var dim=_.keys({name:'maweichao',age:'96',address:'hebei'});
			console.log(dim[0]);
			
		</script>
	</body> 
</html>